package com.ccsu.eb.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ccsu.eb.mapper.EbUserMapper;
import com.ccsu.eb.model.EbUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description: 用一句话描述
 * @Auther: 新梦想*陈超
 * @Date: 2022/3/18 16:09
 */
@Service
public class EbUserService {

    @Resource
    private EbUserMapper ebUserMapper;

    /**
     * 根据用户名和密码进行的登录
     * @param username
     * @param password
     * @return 登录成功 的用户对象
     */
    public EbUser login(String username,String password){
        EbUser lgnUser = ebUserMapper.selectOne(new QueryWrapper<EbUser>()
                .eq("eu_user_id", username)
                .eq("eu_password", password));
        return  lgnUser;
    }
}
